<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import {getPersonMsg} from "@/api/api";
// import { Toast } from 'vant';


export default {
  name: "App",
  data() {
    return {
      // active: 0,
    };
  },
  created() {
    let wu = window.navigator.userAgent.toLowerCase()
    // console.log(wu)
    // alert(wu)
    if(!/quark/.test(wu)&&!/firefox/.test(wu)){
      alert('推荐使用夸克以及火狐浏览器')
    }
    this.$store.state.whichCheckd = []
    this.$store.commit('changeFooter',JSON.parse(localStorage.vuex))
    getPersonMsg().then(res=>{
      console.log(res)
      if(res.data.code==0){
        this.$store.state.isLogin = true
        this.$store.commit('getUserInfo',JSON.parse(localStorage.vuex).userInfo)
        console.log(this.$store.state.userInfo)
      }else{
        console.log(res.data.msg)
        this.$store.state.isLogin = false
      }
    })


  }
}
</script>




<style lang="less">
body,
html{
  max-width: 768px;
  min-width: 320px;
  margin:auto;
}
* {
  margin: 0;
  padding: 0;
}
ul,
ol,
li {
  list-style: none;
}
a,
a:hover,
a:focus {
  text-decoration: none;
  color: #000;
}
.defl {
  display: flex;
  justify-content: space-between;
}
.oneLine {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
</style>
